// Scripting types

#pragma once
#include <windows.h>
#include "../ScriptHook/ScriptingTypes.h"

using namespace System::Windows::Media::Media3D;
using namespace System;

namespace GTA
{ 

	
	public ref class Quaternion
	{
	private:

	public:
		Quaternion::Quaternion();
		Quaternion::Quaternion(f32 w,f32 x,f32 y,f32 z);
		System::Windows::Media::Media3D::Quaternion^ Base;
		virtual property f32 W
		{
			f32 get() { return (f32)Base->W; }
			void set(f32 w) { Base->W = (double)w; }
		};
		virtual property f32 X
		{
			f32 get() { return (f32)Base->X; }
			void set(f32 x) { Base->X = (double)x; }
		};
		virtual property f32 Y
		{
			f32 get() { return (f32)Base->Y; }
			void set(f32 y) { Base->Y = (double)y; }
		};
		virtual property f32 Z
		{
			f32 get() { return (f32)Base->Z; }
			void set(f32 z) { Base->Z = (double)z; }
		};


	};


	public ref class Vector3
	{
	private:

	public:
		Scripting::Vector3* Base;
		Vector3::Vector3();
		Vector3::Vector3(float x, float y, float z);
		Vector3::~Vector3()
		{
			delete Base;
		}

		property float X
		{
			float get() { return Base->X; }
			void set(float x) { Base->X = x; }
		}
		
		property float Y
		{
			float get() { return Base->Y; }
			void set(float y) { Base->Y = y; }
		}
		
		property float Z
		{
			float get() { return Base->Z; }
			void set(float z) { Base->Z = z; }
		}

		Vector3^ Cross(Vector3^ other);
		Vector3^ Normalize();
		double Dot(Vector3^ other);

		GTA::Quaternion^ Vector3::GetRotationTo(Vector3^ destination);
		//Quaternion^ GetRotationTo(Vector3^ destination);

		//In a 2D grid, returns the angle to a specified point from the +X axis
		//static float Vector3::ArcTanAngle(float x, float y);
		//returns Euler angles that point from one point to another
		//static Vector3^ Vector3::AngleTo(Vector3 from, Vector3 location);

	};

	public ref class Texture
	{ // todo: texture functions
	private:
		u32 _Handle;
	public:
		Texture() {;};
		Texture(Scripting::Texture setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::Texture Base
		{
			Scripting::Texture get() {Scripting::Texture retval; retval.Handle = Handle; return retval;};
			void set(Scripting::Texture setval) {Handle = setval.Handle;};
		}
	};

	public ref class Blip
	{
		// TODO: OnPlayerEnterBlip(), OnPLayerActivateBlip()
		// TODO: Blips collection in World class, which auto checks for player enter, etc
	private:
		u32 _Handle;
	public:
		Blip() {;};
		Blip(Scripting::Blip setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::Blip Base
		{
			Scripting::Blip get() {Scripting::Blip retval; retval.Handle = Handle; return retval;};
			void set(Scripting::Blip setval) {Handle = setval.Handle;};
		}
	};

	public ref class DecisionMaker
	{ // todo: DecisionMaker functions
	private:
		u32 _Handle;
	public:
		DecisionMaker() {;};
		DecisionMaker(Scripting::DecisionMaker setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::DecisionMaker Base
		{
			Scripting::DecisionMaker get() {Scripting::DecisionMaker retval; retval.Handle = Handle; return retval;};
			void set(Scripting::DecisionMaker setval) {Handle = setval.Handle;};
		}
	};

	public ref class Camera
	{ // todo: camera functions
	private:
		u32 _Handle;
	public:
		Camera() {;};
		Camera(Scripting::Camera setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::Camera Base
		{
			Scripting::Camera get() {Scripting::Camera retval; retval.Handle = Handle; return retval;};
			void set(Scripting::Camera setval) {Handle = setval.Handle;};
		}
	};

	public ref class CarGenerator
	{ // todo: CarGenerator functions
	private:
		u32 _Handle;
	public:
		CarGenerator() {;};
		CarGenerator(Scripting::CarGenerator setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::CarGenerator Base
		{
			Scripting::CarGenerator get() {Scripting::CarGenerator retval; retval.Handle = Handle; return retval;};
			void set(Scripting::CarGenerator setval) {Handle = setval.Handle;};
		}
	};

	public ref class Group
	{ // todo: Group functions
	private:
		u32 _Handle;
	public:
		Group() {;};
		Group(Scripting::Group setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::Group Base
		{
			Scripting::Group get() {Scripting::Group retval; retval.Handle = Handle; return retval;};
			void set(Scripting::Group setval) {Handle = setval.Handle;};
		}
	};

	public ref class Pickup
	{ // todo: Pickup functions
	private:
		u32 _Handle;
	public:
		Pickup() {;};
		Pickup(Scripting::Pickup setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::Pickup Base
		{
			Scripting::Pickup get() {Scripting::Pickup retval; retval.Handle = Handle; return retval;};
			void set(Scripting::Pickup setval) {Handle = setval.Handle;};
		}
	};

	public ref class Interior
	{ // todo: Interior functions
	private:
		u32 _Handle;
	public:
		Interior() {;};
		Interior(Scripting::Interior setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::Interior Base
		{
			Scripting::Interior get() {Scripting::Interior retval; retval.Handle = Handle; return retval;};
			void set(Scripting::Interior setval) {Handle = setval.Handle;};
		}
	};


	public ref class TextureDict
	{ // todo: TextureDict functions
	private:
		u32 _Handle;
	public:
		TextureDict() {;};
		TextureDict(Scripting::TextureDict setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::TextureDict Base
		{
			Scripting::TextureDict get() {Scripting::TextureDict retval; retval.Handle = Handle; return retval;};
			void set(Scripting::TextureDict setval) {Handle = setval.Handle;};
		}
	};

	public ref class CoverPoint
	{ // todo: CoverPoint functions
	private:
		u32 _Handle;
	public:
		CoverPoint() {;};
		CoverPoint(Scripting::CoverPoint setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::CoverPoint Base
		{
			Scripting::CoverPoint get() {Scripting::CoverPoint retval; retval.Handle = Handle; return retval;};
			void set(Scripting::CoverPoint setval) {Handle = setval.Handle;};
		}
	};

	public ref class TaskSequence
	{ // todo: TaskSequence functions
	private:
		u32 _Handle;
	public:
		TaskSequence() {;};
		TaskSequence(Scripting::TaskSequence setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::TaskSequence Base
		{
			Scripting::TaskSequence get() {Scripting::TaskSequence retval; retval.Handle = Handle; return retval;};
			void set(Scripting::TaskSequence setval) {Handle = setval.Handle;};
		}
	};

	public ref class ScriptHandle
	{ 
	private:
		u32 _Handle;
	public:
		ScriptHandle() {;};
		ScriptHandle(Scripting::ScriptHandle setval) {Base = setval;};
		virtual property u32 Handle
		{
			u32 get() {return _Handle;};
			void set(u32 setval) {_Handle = setval;};
		}
		virtual property Scripting::ScriptHandle Base
		{
			Scripting::ScriptHandle get() {Scripting::ScriptHandle retval; retval.Handle = Handle; return retval;};
			void set(Scripting::ScriptHandle setval) {Handle = setval.Handle;};
		}
	};

};


